# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Maintainer: Valery Kartel <valery.kartel@gmail.com>
pkgname=libnsl
pkgver=2.0.0
pkgrel=0
pkgdesc="Public client interface for NIS(YP) and NIS+ in a IPv6 ready version"
url="https://github.com/thkukuk/libnsl"
arch="all"
license="LGPL-2.0-or-later"
makedepends="autoconf automake gettext-dev libtirpc-dev libtool"
subpackages="$pkgname-static $pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/thkukuk/libnsl/archive/v$pkgver.tar.gz"

prepare() {
	default_prepare
	autoreconf -vfi
}

check() {
	make check
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
86a7738707a3e4e56b60c8de0445fb576e66148bc12fa2a6aab422ea81eb4b42be3287a12f78384acd2b8bfb3885e9a0ce4f7328f078da3a5099acb66a35a935  libnsl-2.0.0.tar.gz
"
